std::bitset::operator&=,|=,^=,^

From Cppreference

Jump to: navigation, search
bitset<N>& operator&=( const bitset<N>& other );
(1)
bitset<N>& operator|=( const bitset<N>& other );
(2)
bitset<N>& operator^=( const bitset<N>& other );
(3)
bitset<N> operator^() const;
(4)

Performs binary AND, OR, XOR and NOT.

1) Sets the bits to the result of binary AND on corresponding pairs of bits of *this and other.

2) Sets the bits to the result of binary OR on corresponding pairs of bits of *this and other.

3) Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and other.

4) Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and *this. Equivalent to NOT operation, or flip().

Contents

[edit] Parameters

other - another bitset

[edit] Return value

1-3) *this

4) new bitset containing the negated bits

[edit] Example

[edit] See also

operator<<=
operator>>=
operator<<
operator>>
performs binary shift left and shift right
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages